package com.hjw.exer2;

/**
 * 1、定义类Dog，对其属性名字、毛色、品种、体重进行封装，尝试使用get以及set进行赋值以及取值。
 * @author hjwStrart
 * @create 2022-01-11 15:07
 */
public class Dog {
    private String name;      //名字
    private String color;    //颜色
    private String kinds;    //品种
    private Double weight;   //体重


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getKinds() {
        return kinds;
    }

    public void setKinds(String kinds) {
        this.kinds = kinds;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                ", kinds='" + kinds + '\'' +
                ", weight=" + weight +
                '}';
    }
}
